﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YasharEl.Infrastructure.ApplicationModel.Bootstrap.Behavior;
using YasharEl.Infrastructure.ApplicationModel.Bootstrap.Extensibility;
using System.Linq.Expressions;

namespace YasharEl.Infrastructure.ApplicationModel.Bootstrap.Syntax
{
    /// <summary>
    /// Terminal fluent definition syntax interface for behaviors.
    /// </summary>
    /// <typeparam name="TExtension">The type of the extension.</typeparam>
    public interface IEndWithBehavior<TExtension>
        where TExtension : IBootstrappingExtension
    {
        /// <summary>
        /// Attaches a behavior to the currently built executable.
        /// </summary>
        /// <param name="behavior">The behavior.</param>
        /// <returns>
        /// The syntax.
        /// </returns>
        IEndWithBehavior<TExtension> With(IBehavior<TExtension> behavior);

        /// <summary>
        /// Attaches a lazy behavior to the currently built executable.
        /// </summary>
        /// <param name="behavior">The behavior.</param>
        /// <returns>
        /// The syntax.
        /// </returns>
        IEndWithBehavior<TExtension> With(Expression<Func<IBehavior<TExtension>>> behavior);
    }
}
